package com.maxd.config;

import com.google.common.cache.LoadingCache;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.converter.BufferedImageHttpMessageConverter;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

import java.util.List;

@Slf4j
//@Component
public class ImageWebMvcConfigurationSupport extends WebMvcConfigurationSupport {

    protected void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
        log.info("添加图片返回解析器.");
        converters.add(new BufferedImageHttpMessageConverter());
    }

}
